function C = fct(x)

N=length(x);
v=zeros(1,N);
n=0;
while n<= (N-1)/2
    v(n+1)=x(2*n+1);
    n=n+1;
end
while n<=N-1
    v(n+1)=x(2*N-2*n);
    n=n+1;
end

V=fft(v);
C=zeros(1,N);
for k=0:N-1
    C(k+1)=2*real(exp(-i*2*pi*k/(4*N))*V(k+1));
end
end